package com.ruoyi.common.enums;


public enum OrderFileType {
    REQUIREMENT("1", "写作要求"),
    CREATE("2", "新建稿"),
    UPDATE("3", "修改稿"),
    UPDATE_REQUIREMENT("4", "修改要求");


    private final String code;

    private final String value;

    OrderFileType(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static OrderFileType getByCode(String code) {
        for (OrderFileType orderFileType : OrderFileType.values()) {
            if (orderFileType.getCode().equals(code)) {
                return orderFileType;
            }
        }
        return null;
    }
}
